<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js"><span id='global-property-'>/**
</span> * @ignore
 * filter menu render
 * 1.create filter input
 * 2.change menu content element
 * @author yiminghe@gmail.com
 */
KISSY.add(&quot;filter-menu/render&quot;, function (S, Node, Menu, FilterMenuTpl, ContentRenderExtension) {

    return Menu.getDefaultRender().extend([ContentRenderExtension], {

        beforeCreateDom:function(renderData,childrenElSelectors){
            S.mix(childrenElSelectors, {
                placeholderEl: '#ks-filter-menu-placeholder-{id}',
                filterInputWrap: '#ks-filter-menu-input-wrap-{id}',
                filterInput: '#ks-filter-menu-input-{id}'
            });
        },

        getKeyEventTarget: function () {
            return this.control.get(&quot;filterInput&quot;);
        },

        '_onSetPlaceholder': function (v) {
            this.control.get(&quot;placeholderEl&quot;).html(v);
        }
    }, {
        ATTRS: {
            contentTpl: {
                value: FilterMenuTpl
            }
        },

        HTML_PARSER: {
            placeholderEl: function (el) {
                return el.one(&quot;.&quot; + this.getBaseCssClass('placeholder'))
            },
            'filterInputWrap': function (el) {
                return el.one(&quot;.&quot; + this.getBaseCssClass('input-wrap'));
            },
            filterInput: function (el) {
                return el.one(&quot;.&quot; + this.getBaseCssClass('input'));
            }
        }
    });

}, {
    requires: ['node', 'menu', './render-xtpl', 'component/extension/content-render']
});</pre>
</body>
</html>
